package com.gladlee.myACP;

import static com.gladlee.myACP.tool.myAtomTool.getBytes;
import static java.lang.System.out;

import java.io.UnsupportedEncodingException;

import com.gladlee.ACP.Atom;

public class myAtomUserTest extends myAtomUser{
	public static void main(String[] args) {
		myAtomUserTest user = new myAtomUserTest();
		Atom atom=new Atom("59.66.136.255");
		atom.regUser(user);
		byte[] byte_data = getBytes(4.5);
		String cc = "ACPower";
		byte[] buffer=null;
		buffer = user.encode(cc, byte_data);
		try {
			user.decode(buffer);
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		if(atom.getADFIn().size()>0){
			double d=atom.getDoubleData(cc);
			out.println(d);
		}
	}

}
